<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="fy.bean.*,java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("utf-8");
String picture = request.getParameter("picture");
String title = request.getParameter("title");
String category = request.getParameter("category");
int homepage = Integer.parseInt(request.getParameter("homepage"));
String link = request.getParameter("link");
String categoryname = request.getParameter("categoryname");

int id = Integer.parseInt(request.getParameter("id"));
System.out.print("updata.jsp : id:"+id+"+picture :"+picture +"+category :"+category
		+"+homepage :"+homepage+"+title :"+title+"link :"+link+"categoryname :"+categoryname);
PictureBean pictureBean = new PictureBean();
  if(pictureBean.Updata(picture,title,category,homepage,link,categoryname,id)){
    	response.setCharacterEncoding("utf-8");
    	 PrintWriter pout = response.getWriter();
    	 pout.print("<script>alert('成功'); ");
    	 pout.flush();
    	 pout.close();
	}else{
		response.setCharacterEncoding("utf-8");
		PrintWriter pout = response.getWriter();
		pout.print("<script>alert('不成功'); window.location='../useradmin.jsp' </script>");
		pout.flush();
		pout.close();
		//response.sendRedirect("login.html");
	};

%>